package com.bcbim.operation_maintenance.table_head.mapper;

import com.bcbim.operation_maintenance_interface.table_head.dao.SpaceTableHeadDAO;
import com.bcbim.operation_maintenance_interface.table_head.dto.TableCheckDTO;
import com.bcbim.operation_maintenance_interface.table_head.vo.SpaceTableHeadVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @version V 1.0.0
 * @Description：空间信息表头设置mapper
 * @Author: haomeijie
 * @Date: 2022/3/9 9:53
 **/
@Mapper
public interface SpaceTableHeadMapper {
    /**
     * 判断用户是否设置过表头
     *
     * @param spaceTableCheckDTO
     * @return boolean
     * @Author: haomeijie
     * @Date: 2022/3/9 9:49
     */
    int checkSpaceTableHeadByUserId(TableCheckDTO spaceTableCheckDTO);

    /**
     * 查询表头设置列表
     *
     * @param spaceTableCheckDTO
     * @return List<SpaceTableHeadVO>
     * @Author: haomeijie
     * @Date: 2022/3/9 9:50
     */
    List<SpaceTableHeadVO> listSpaceTableHead(TableCheckDTO spaceTableCheckDTO);

    /**
     * 根据用户新增表头设置
     *
     * @param list
     * @return int
     * @Author: haomeijie
     * @Date: 2022/3/9 10:32
     */
    int batchInsertSpaceTableHead(List<SpaceTableHeadDAO> list);

    /**
     * 根据用户修改表头设置
     *
     * @param list
     * @return int
     * @Author: haomeijie
     * @Date: 2022/3/9 10:32
     */
    int batchUpdateSpaceTableHead(List<SpaceTableHeadDAO> list);

    /**
     * 根据用户修改表头设置取消勾选
     *
     * @param spaceTableCheckDTO
     * @return int
     * @Author: haomeijie
     * @Date: 2022/3/9 10:32
     */
    int batchNoChecked(TableCheckDTO spaceTableCheckDTO);


    /**
     * 查询用户勾选的表头
     *
     * @param userId
     * @return List<SpaceTableHeadVO>
     * @Author: haomeijie
     * @Date: 2022/3/18 9:24
     */
    List<SpaceTableHeadVO> selectCheckedTableByUserId(@Param("userId") String userId, @Param("projectId") String projectId);
}
